
# $Id: Rule.mk 44 2007-08-08 06:45:33Z kf701.ye $

# if you want to disable one function,
# modify 1 to 0, that is all!
NEED_NET_UTIL=1
NEED_BASE64=1
NEED_ALGORITHM_UTIL=1
NEED_TTY_UTIL=1
NEED_THREAD_UTIL=1
NEED_RAND_UTIL=1
NEED_FILE_UTIL=1
NEED_DRAW_UTIL=1
NEED_MEM_POOL=1
NEED_DATA_QUEUE=1
NEED_TIME_UTIL=1
NEED_OSS_UTIL=1

OBJS += readline.o rio.o debug.o

ifeq ($(NEED_NET_UTIL), 1)
DLIB += -DNEED_NET_UTIL=1
OBJS += nonblock.o netutil.o tcpserver_epoll.o tcpserver_select.o udpserver.o unix_socket.o email.o
NEED_BASE64=1
endif

ifeq ($(NEED_BASE64), 1)
DLIB += -DNEED_BASE64=1
OBJS += base64.o
endif

ifeq ($(NEED_ALGORITHM_UTIL), 1)
DLIB += -DNEED_ALGORITHM_UTIL=1
OBJS += convert.o crypt.o md5.o 
endif

ifeq ($(NEED_TTY_UTIL), 1)
DLIB += -DNEED_TTY_UTIL=1
OBJS += tty.o
endif

ifeq ($(NEED_THREAD_UTIL), 1)
DLIB += -DNEED_THREAD_UTIL=1
OBJS += thread.o
endif

ifeq ($(NEED_RAND_UTIL), 1)
DLIB += -DNEED_RAND_UTIL=1
OBJS += rand.o
endif

ifeq ($(NEED_FILE_UTIL), 1)
DLIB += -DNEED_FILE_UTIL=1
OBJS += iconvme.o pad.o play_wav.o
endif

ifeq ($(NEED_DRAW_UTIL), 1)
DLIB += -DNEED_DRAW_UTIL=1
OBJS += draw.o
endif

ifeq ($(NEED_MEM_POOL), 1)
DLIB += -DNEED_MEM_POOL=1
OBJS += mem_pool.o
endif

ifeq ($(NEED_DATA_QUEUE), 1)
DLIB += -DNEED_DATA_QUEUE=1
OBJS += queue.o
endif

ifeq ($(NEED_TIME_UTIL), 1)
DLIB += -DNEED_TIME_UTIL=1
OBJS += time_misc.o rtc.o
endif

ifeq ($(NEED_OSS_UTIL), 1)
DLIB += -DNEED_OSS_UTIL=1
OBJS += oss_mixer.o
endif

export DLIB
export OBJS
